package com.hontech.bv.conn.serial

import com.hontech.desktoppastacooker.codec.decodeUint32
import com.hontech.bv.codec.encodeUint32
import com.hontech.desktoppastacooker.conn.serial.SerialType

class Uint32 (var value: Int) : SerialType {

    override fun size(): Int {
        return 4
    }

    override fun encode(buf: ByteArray, offset: Int) {
        encodeUint32(buf, offset, value)
    }

    override fun decode(buf: ByteArray, offset: Int) {
        value = decodeUint32(buf, offset)
    }
}

